package net.lainiao.service;

import net.lainiao.dao.AdminMapper;
import net.lainiao.model.Admin;
import org.jboss.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * Created by Administrator on 2016/10/26.
 */
@Service
public class AdminService{
    private Logger logger=Logger.getLogger(this.getClass().getName());
    @Autowired
    AdminMapper adminMapper;

    public int getCount(){
       if(adminMapper==null){
            logger.error("获取adminMapper失败");
       }
       return adminMapper.getCount();
    }

    public Admin getAdminById(long adminId){
        return adminMapper.selectByPrimaryKey(adminId);
    }
}
